home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / misc~1 / 123 / stcitdoc.arc / BAT-HINT.DOC < prev    next >
Encoding:
Text File  |  1987-10-09  |  2.5 KB  |  63 lines

  1. BAT-HINT.DOC
  2.  
  3.     No program is ever bug-free.  However, it is nice to pretend that
  4. one is, and an effective way to pretend that a particular program
  5. has achieved such a goal is by never having it require your
  6. attention when you are attending to other things.
  7.  
  8.     STadel tries to emulate this sort of software by returning a
  9. value to GEMDOS when it terminates gracefully.  There are 4 possible
  10. values returned by STadel that can be read by a GEMDOS batch file
  11. (provided, of course, that you are using a batch processor that can
  12. handle it.):
  13.  
  14. 0)  indicates that the sysop requested that the program terminate.
  15. 1)  indicates that the system terminated due to the TIMEOUT
  16.     parameter in CTDLCNFG.SYS.
  17. 2)  indicates ABNORMAL termination, i.e., the system had an error
  18.     of some sort and has crashed gracefully.
  19. 3)  indicates that a Remote sysop has taken the system down via
  20.     Remote sysop capabilities.
  21.  
  22.     Furthermore, STadel, when called with ANY argument(s) on the
  23. command line, will leave message in the Aide> room notifying the
  24. aides that the system came up at the time specified in the message
  25. header. The argument itself doesn't matter; it's presence on the
  26. command line is the important part.
  27.  
  28.     And, plus, when CONFIGUR is called with any argument(s) (just
  29. like CITADEL, above), it will assume that it is in unattended mode,
  30. and will not ask the sysop if he wants to erase the files; it will
  31. assume that since the sysop is not around, he wants to preserve his
  32. data files, and just scans the files.
  33.  
  34.     What can you do with the above? Here is the batch file I use
  35. for running STadel with the teeny-shell (my own shell....)
  36.  
  37. >>  #
  38. >>  # Fire pell up and let it fly...
  39. >>  #
  40. >>  here=$cwd
  41. >>  cd f:/
  42. >>  while [ "$status" !~ exit ]
  43. >>      if [ ! -e CTDLTABL.SYS ]
  44. >>          configur x
  45. >>          status=$? crash=kablooey
  46. >>          if [ $status !~ 0 ] ; status=exit; fi
  47. >>      else
  48. >>          status=0
  49. >>      fi
  50. >>      if [ $status ~ 0 ]
  51. >>          citadel +netlog $crash
  52. >>          status=$?
  53. >>          # echo citadel returns status = $status
  54. >>          if [ $status ~ 1 ] ; cp -f *.sys backup; fi   # timeout
  55. >>          if [ $status ~ 0 ] ; status=exit       ; fi   # sysop exit
  56. >>          if [ $status ~ 3 ] ; status=exit       ; fi   # remote exit
  57. >>          if [ $status ~ 10 ]; uucall            ; fi   # uucp event
  58. >>      fi
  59. >>      unset crash
  60. >>  done
  61. >>  unset status        # in case we sourc'ed this file....
  62. >>  cd $here
  63.